/************************************************************
 *                                                          *
 * Copyright (c) 2001-2012 McObject LLC. All Right Reserved.*
 *                                                          *
 ************************************************************/

#ifndef MCO_HTTPVIEWER
    #define MCO_HTTPVIEWER

    typedef struct tag_mcohv_interface_def
    {

        char* interface_addr;
        unsigned short port;

    } mcohv_interface_def_t;

    typedef void* mcohv_p;

    int mcohv_initialize();
    int mcohv_shutdown();
    int mcohv_start(mcohv_p* hv, mco_metadict_header_t *db, mcohv_interface_def_t* intf, unsigned int n_intf);
    int mcohv_start_connect(mcohv_p* hv, char* db_name, mcohv_interface_def_t* intf, unsigned int n_intf);
    int mcohv_stop(mcohv_p hv);

    void mcohv_process_one_connection(mcohv_p hv, long timeout);
    void mcohv_process_one_interface(mcohv_p hv, long timeout);

    /*

    typedef void * mutex_t;
    typedef void * thread_t;

    void mutex_initialize  ( mutex_t * );
    void mutex_clear       ( mutex_t * );
    void mutex_lock        ( mutex_t * );
    void mutex_unlock      ( mutex_t * );

    void thread_interior_initialize ();
    void thread_interior_clear      ();
    void thread_initialize          ( thread_t * );
    void thread_clear               ( thread_t * );
    int  thread_start               ( thread_t *, void * (*proc) (void*), void *  );
    void thread_stop                ( thread_t * );
    int  thread_is_stopped          ( thread_t * );

     */

#endif
